package com.sunny.ihealth.entity.app;

import org.litepal.annotation.Column;
import org.litepal.crud.DataSupport;

/**
 * 用户运动记录
 * Created by Sunny  An on 2016/6/6.
 */
public class SportData extends DataSupport {

    public static final String VISITOR = "v";

    private long id;
    private long day;
    private String username;
    @Column(defaultValue = "0")
    private int walk;   //步数
    @Column(defaultValue = "0")
    private int runTime;   //单位  分钟
    @Column(defaultValue = "0")
    private int runDistance; //单位 米
    @Column(defaultValue = "0")
    private int sleepTime;   //单位 分钟


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getDay() {
        return day;
    }

    public void setDay(long day) {
        this.day = day;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getWalk() {
        return walk;
    }

    public void setWalk(int walk) {
        this.walk = walk;
    }

    public int getRunTime() {
        return runTime;
    }

    public void setRunTime(int runTime) {
        this.runTime = runTime;
    }

    public int getRunDistance() {
        return runDistance;
    }

    public void setRunDistance(int runDistance) {
        this.runDistance = runDistance;
    }

    public int getSleepTime() {
        return sleepTime;
    }

    public void setSleepTime(int sleepTime) {
        this.sleepTime = sleepTime;
    }

    public boolean isVisitor() {
        return username != null && VISITOR.equals(username);
    }

}
